<?php
//setTireInfoMount
require_once("lib/db_connection.php");
$tire_id = $_GET["tire_id"];
$veh_id = $_GET["vin"];

$query_select ="SELECT tire_id, tire_SN, cost, curr_tread, curr_psi FROM tire_inventory_tbl WHERE tire_id='".$tire_id."'";
$result_select = mysql_query($query_select) or die("SELECT LOCS ".mysql_error());

$row_select = mysql_fetch_array($result_select);

$tire_id = $row_select['tire_id'];
$sn = $row_select['tire_SN'];
$cost = $row_select['cost'];
$tread = $row_select['curr_tread'];
$psi = $row_select['curr_psi'];

$query_veh = "SELECT vin FROM vehicle_tbl WHERE vehicle_id='".$veh_id."'";
$result_veh = mysql_query($query_veh) or die("SELECT VEHICLE ".mysql_error());
$row_veh = mysql_fetch_array($result_veh);

$vin = $row_veh['vin'];

//$arr_string = "'$sn','$cost','$tire_id','$vin'";
$arr_string = "'$sn','','$tire_id','$vin','$tread','$psi'";
echo "new Array($arr_string)";
?>
